<?php
namespace Admin\Controller;
class AdviseController extends AdminController{
    public function index() {
        $result = $this->lists('advise');
        foreach ($result as $key=>$val) {
            $result[$key]['name'] = M('member')->where('uid='.$val['uid'])->getField('nickname');
            $result[$key]['create_time'] = date('Y-m-d H:i:s', $val['create_time']);
        }
        $this->assign('result', $result);
        $this->display('index');
    }
    public function info() {
        $id = I('id');
        $result = M('advise')->where('id='.$id)->find();
        $this->assign('result', $result);
        $this->display('info');
    }
}